This is a transitional document with numerous errors in XHTML syntax and structure

Let's see if you can fix them all & make this document validate using the W3C validation service.

Here are your directions:

  1. First, notice that this document displays properly even though there are errors in it. That is because too MANY browsers compensate for sloppy code.

  2. This week we are concentrating on syntax and structure of text and list elements. Hint: well-formed, tags are closed, attribute quoting, proper nesting order, etc. etc.

    1. Some easy first steps to take:

      1. Right mouse click on the screen and choose view source.

      2. Then choose Edit; Select All; then Edit; Copy.

      3. In your HTML editor or text editor, open a blank document, RIGHT mouse click and choose Paste. Save the document as wk2_trans.html

      4. Go through the code and make any and all changes needed to get the document to validate as XHTML.

  3. You can indent tags and add white space to make the code easier to read

  4. Add two comments, one to denote where this list starts and one to denote where it ends.

  5. Add a comment tag that has your name listed as the document creator.

  6. Last but not least, validate this document.

  7. If you feel comfortable doing so, cut & paste the HTML code that the W3C provides when the document validates as an XHTML file. Make sure to save the icon by doing a right mouse click on the icon and choosing Save Picture... of course you can only add this code if your document validates :-)

  8. Last but not least, please don't panic if this exercise seems overwhelming. I don't expect everyone to find all the errors, but you need to get used to looking at markup, making corrections and running the document through the validator. Do your best, start at the top and look at every tag. Try to reach valid XHTML. Look at the error report you get back and do your best to figure out where your errors are. By the time this class is over, you will be pros at XHTML syntax and structure. I deliberately made this hard. I want you to jump in with both feet! You might consider (just consider) trying to validate the document - as is - if you're not sure where to start. That's one approach to finding and fixing the errors.

XML parsers and user agents on small devices will not fix bad code. Instead they will stop running when they hit an error in syntax or structure. XML and XHTML documents must be "well-formed." This is a good reason to take this class: You will learn to code correctly - neatly, cleanly and with rigor :-)

For your information, here is what the font inside <PRE> tags looks like.

It is a fixed-width, monospaced font and any white space appears exactly as you typed it, unlike text inside other tags where you can put as much white space as you want. <pre> tags are nice to use when you are displaying code for a reader and want to retain the white space. Here is an example of an HTML 4.0 DOCTYPE. But what is wrong with the way I am trying to display the Doctype? Why can't you see it? It should be right below this sentence! And I even put it inside a <pre> element!

      			<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

      			<html>
      				<head>
           				<title>Sample DOCTYPE </title>
      				</head>
      				<body>
         
      				</body>
      			</html>

More FYI: the tags used in the body of this document are heading tags, paragraph tags, break tags, pre tags, ordered list tags which include ordered list and list item, table tags which include table, table row and table data, and blockquote tags. Please notice how these different tags affect the display of the text within them.
This    
  is  
    tough!

Valid XHTML 1.0 Strict